package com.fenghongzhang.ivideo

import android.annotation.SuppressLint
import android.app.Application
import android.content.Context
import com.alibaba.android.arouter.BuildConfig
import com.alibaba.android.arouter.launcher.ARouter
import com.orhanobut.logger.AndroidLogAdapter
import com.orhanobut.logger.Logger
import com.tencent.mmkv.MMKV
import dagger.hilt.android.HiltAndroidApp
import java.util.concurrent.Executors
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.SynchronousQueue
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit


@HiltAndroidApp
class App : Application() {
    override fun onCreate() {
        super.onCreate()
        ARouterInit(this)
        Logger.addLogAdapter(AndroidLogAdapter())
        MMKV.initialize(this);
    }

    /**
     * ARouter初始化
     * @param myApplication
     */
    private fun ARouterInit(myApplication: App) {
        //ARouter初始化
        if (BuildConfig.DEBUG) {
            ARouter.openLog()
            ARouter.openDebug()
        }
        ARouter.init(this)
    }
}